#include <stdio.h>
#include <limits.h>

#define swap(type ,a, b) ({ \
        type tmp = b; \
        b = a; \
        a = tmp; \
        })

#define ppp(a,b) ((a)*(b))

void main(void){

    int i = 0;
    float j = 0.00;

    float iSum = 0;
    float iFloat = 0.00;

    for (; i<=100; i++, j+=.01) {
        printf("%.2f %f\n", i/100.0, j);

        iSum += i/100.0;
        iFloat += j;
    }

    puts("\n----------");

    printf("%f %f\n", iSum, iFloat);

    puts("\n\n");

    int a = 2;
    int b = 4;

    printf("a=%d, b=%d\n", a, b);
    swap(int ,a, b);


    printf("a=%d, b=%d\n", a, b);

    int c = ppp(1+a,1+b);

    printf("a=%d; b=%d\n", a, b);

    printf("c=%d\n", c);

    enum animals {Cat, Fash=8, Fox, Dog, Invalid};

    puts("----- animals -----\n");
    printf("Cat: %d\n", Fash);

    char str[] = "ABC\0DE";

    char chrs[] = {'A', 'B', 77};

    printf("%s len: %d\n", str, (unsigned)sizeof(str));

    char chr = 'A';

    printf("%c\n", chr);

    printf("%s len:%d\n", chrs, sizeof(chrs));

    int x=1;
    int y=100;
    int jk =0;
    jk = (++x,++y);
    printf("jk:%d\n", jk);


    return;


}
